/* SPDX-License-Identifier: GPL-2.0-or-later */
 /*
 * useradl.h
 *
 * Userspace dlm defines
 *
 * Copyright (C) 2002, 2004 Oracle.  All rights reserved.
 */

#ifndef USERADL_H
#define USERADL_H

#include "lockfs.h"
#include "adl/adlapi.h"

enum {
	LOCK_BLOCK_NUM,
	LOCK_SECTOR_OFFSET,
	LOCK_ERR,
};

struct ocfs2_adl_cluster_connection *user_adl_register(char *domain_name,
				int domain_len);
void user_adl_unregister(struct ocfs2_adl_cluster_connection *conn);
int user_adl_cluster_lock(struct user_lock_res *lockres, int level, int lkm_flags);
int user_adl_cluster_unlock(struct user_lock_res *lockres, int level);
int user_adl_lock_res_init(struct user_lock_res *lockres, struct dentry *dentry);
int user_adl_destroy_lock(struct user_lock_res *lockres);

#endif /* USERADL_H */

